package com.smart.business.controller;

import com.github.pagehelper.PageInfo;
import com.smart.aop.log.LogType;
import com.smart.aop.log.SaveLog;
import com.smart.aop.permission.HasPermission;
import com.smart.common.annotation.PermissionCheck;
import com.smart.common.utils.AuthUtil;
import com.smart.common.utils.DateUtil;
import com.smart.common.utils.ThreadLocalUtil;
import com.smart.entity.business.PointLocationEntity;
import com.smart.entity.system.IdentityEntity;
import com.smart.entity.system.UserEntity;
import com.smart.model.excel.annotation.ExcelField;
import com.smart.model.response.r.Result;
import com.smart.model.response.r.ResultCode;
import com.smart.model.response.r.ResultWrapper;
import com.smart.service.business.CompanyService;
import com.smart.service.business.PointLocationService;
import com.smart.service.system.UserService;
import com.smart.tools.excel.ExcelExport;
import com.smart.tools.excel.ExcelImport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletResponse;
import java.util.*;

/**
 * 点位管理 Controller
 *
 * @author wf
 * @since 2025-06-07 11:30:34
 */

@RestController
@RequestMapping("/business/pointLocation")
public class PointLocationController {
    @Autowired
    PointLocationService pointLocationService;

    /**
     * 服务商 根据运营商id查询公司柱状图信息
     * @return String
     */
    @PermissionCheck
    @GetMapping("/getCompanyPointBar")
    public String getCompanyPointBar() {
        return Result.data(pointLocationService.getCompanyPointBar());
    }

    /**
     * 服务商 所有公司点位状态
     * @return String
     */
    @PermissionCheck
    @GetMapping("/getAllCompanyPointStatus")
    public String getAllCompanyPointStatus() {
        return Result.data(pointLocationService.getAllCompanyPointStatus());
    }

    /**
     * 服务商 饼状图数据显示
     * @return String
     */
    @PermissionCheck
    @GetMapping("/getPointPie")
    public String getPointPie() {
        return Result.data(pointLocationService.getPointPie());
    }

    /**
     * 服务商 公司点位地图数据显示
     * @return String
     */
    @PermissionCheck
        @GetMapping("/getCompanyLocation")
    public String getCompanyLocation() {
        return Result.data(pointLocationService.getCompanyLocation());
    }






}
